


export const isMobile = (mobile) => {
    const reg = /^1[3|5|8|4|7|9|6]{1}[0-9]{1}[0-9]{8}$/;
    return reg.test(mobile);
}


export const isEmail = (email) =>{
    const reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\-|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
    return reg.test(email)
}

export const isUserName = (name) => {
    const reg = /^[a-zA-Z0-9]{1}([a-zA-Z0-9]|[._]){5,19}$/
    return reg.test(name);
}

export const isPassword = (password)=>{
    const reg = /^([a-zA-Z0-9]|[._]){6,19}$/
    return reg.test(password)
}